/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package cn.webrx;

import java.net.ServerSocket;
import java.net.Socket;

/**
 * <p>Project: jse2303 - MyServer</p>
 * <p>Powered by webrx On 2023-07-26 11:38:46</p>
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class MyServer {
    public static void main(String[] args) {
        try {
            ServerSocket s = new ServerSocket(Integer.parseInt(args[0]));
            Socket c = s.accept();
            new Thread(new MyWriter(args[1], c)).start();
            new Thread(new MyReader(c)).start();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
